package com.hhd.form.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 单据视图定义
 * @author tangzy
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("design_form_view_definition")
public class DesignFormViewDefinition implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 单据id
     */
    @TableField("form_id")
    private String formId;

    /**
     * html
     */
    @TableField("html")
    private String html;

    /**
     * 页面渲染配置信息
     */
    @TableField("template_configs")
    private String templateConfigs;

    /**
     * 页面宽度
     */
    @TableField("page_width")
    private Integer pageWidth;

    /**
     * 视图名称
     */
    @TableField("view_name")
    private String viewName;

    /**
     * 是否是主视图
     */
    @TableField("main_view")
    private Boolean mainView;

    /**
     * 视图中的组件配置
     */
    @TableField("components")
    private String components;

    /**
     * 是否被删除
     */
    @TableField("del")
    private Boolean del;

    @TableField("create_by")
    private String createBy;

    @TableField("create_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField("update_by")
    private String updateBy;

    @TableField("update_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;


}
